<?php
/**
 * Created by PhpStorm.
 * User: wuxiaojie
 * Date: 2018/6/9
 * Time: 15:48
 *
 * 足疗机
 */

if (!defined('IN_ANWSION')) {
    die;
}

class main extends AWS_CONTROLLER
{

    public function get_access_rule()
    {
        $rule_action['rule_type'] = "white"; //'black'黑名单,黑名单中的检查  'white'白名单,白名单以外的检查

        if ($this->user_info['permission']['visit_explore'] AND $this->user_info['permission']['visit_site']) {
            $rule_action['actions'][] = 'index';
        }

        return $rule_action;
    }

    public function setup()
    {
//        if (is_mobile() AND !$_GET['ignore_ua_check']) {
//            switch ($_GET['app']) {
//                default:
//                    HTTP::redirect('/m/');
//                    break;
//            }
//        }
    }


    /**
     *
     */
    public function index_action()
    {
        //        1	默认分类	question		0	0
//2	踏步机	goods		0	0
//3	椭圆机	goods		0	0
//4	按摩椅垫	goods		0	0
//5	足疗机	goods		0	0
//6	颈肩按摩椅	goods		0	0
//7	商品周边	goods		0	0

        $this->crumb(AWS_APP::lang()->_t('足疗机'), '/aomas/zlj/');


//        $zuliaoji = $this->model('goods')->get_home_goods_list(array('is_on_sale=1','cat_id=5'));

//        TPL::assign('zuliaoji', $zuliaoji);


        $special  =$this->model('goodsSpecial')->get_special_info_by_id(2);

        TPL::assign('special',$special);

        if (is_mobile() AND !$_GET['ignore_ua_check']) {

            TPL::output('aomas/m_zlj/index');

        }else{
            TPL::output('aomas/zlj/index');
        }

    }


}